# class person(object):
#
#     def __eq__(self, other):
#         return "查询条件"
#
#
# if __name__ == '__main__':
#     p1 = person()
#     p2 = person()
#     print(p1 == p2)
#
#     filter = [1, 3, 4]
#     print(filter)
#     print(*filter)

# import functools
import functools
# 使用装饰器装饰带视图函数后，视图函数的名称一些注释会发生改变
# 解决方案：@functools.wraps(func)解决


# 普通装饰器
def user_login_data(func):
    @functools.wraps(func)
    def warapper(*args, **kwargs):
        pass
    return warapper


@user_login_data
def index():
    """index"""
    return "index"


@user_login_data
def news():
    """news"""
    return "news"


if __name__ == '__main__':
    print(index.__name__)
    print(news.__name__)